Optimal. Leaf size=200 \[ \frac {(7 A+8 C) \sin (c+d x)}{8 d \sqrt {a \sec (c+d x)+a}}-\frac {(9 A+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{8 \sqrt {a} d}+\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {A \sin (c+d x) \cos ^2(c+d x)}{3 d \sqrt {a \sec (c+d x)+a}}-\frac {A \sin (c+d x) \cos (c+d x)}{12 d \sqrt {a \sec (c+d x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.56, antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4087, 4022, 3920, 3774, 203, 3795} \[ \frac {(7 A+8 C) \sin (c+d x)}{8 d \sqrt {a \sec (c+d x)+a}}-\frac {(9 A+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{8 \sqrt {a} d}+\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {A \sin (c+d x) \cos ^2(c+d x)}{3 d \sqrt {a \sec (c+d x)+a}}-\frac {A \sin (c+d x) \cos (c+d x)}{12 d \sqrt {a \sec (c+d x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3774
Rule 3795
Rule 3920
Rule 4022
Rule 4087
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx &=\frac {A \cos ^2(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {\int \frac {\cos ^2(c+d x) \left (-\frac {a A}{2}+\frac {1}{2} a (5 A+6 C) \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{3 a}\\ &=-\frac {A \cos (c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {A \cos ^2(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {\int \frac {\cos (c+d x) \left (\frac {3}{4} a^2 (7 A+8 C)-\frac {3}{4} a^2 A \sec (c+d x)\right )}{\sqrt {a+a \sec (c+d x)}} \, dx}{6 a^2}\\ &=\frac {(7 A+8 C) \sin (c+d x)}{8 d \sqrt {a+a \sec (c+d x)}}-\frac {A \cos (c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {A \cos ^2(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+\frac {\int \frac {-\frac {3}{8} a^3 (9 A+8 C)+\frac {3}{8} a^3 (7 A+8 C) \sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{6 a^3}\\ &=\frac {(7 A+8 C) \sin (c+d x)}{8 d \sqrt {a+a \sec (c+d x)}}-\frac {A \cos (c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {A \cos ^2(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}+(A+C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx-\frac {(9 A+8 C) \int \sqrt {a+a \sec (c+d x)} \, dx}{16 a}\\ &=\frac {(7 A+8 C) \sin (c+d x)}{8 d \sqrt {a+a \sec (c+d x)}}-\frac {A \cos (c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {A \cos ^2(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}-\frac {(2 (A+C)) \operatorname {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {(9 A+8 C) \operatorname {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 d}\\ &=-\frac {(9 A+8 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{8 \sqrt {a} d}+\frac {\sqrt {2} (A+C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {(7 A+8 C) \sin (c+d x)}{8 d \sqrt {a+a \sec (c+d x)}}-\frac {A \cos (c+d x) \sin (c+d x)}{12 d \sqrt {a+a \sec (c+d x)}}+\frac {A \cos ^2(c+d x) \sin (c+d x)}{3 d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.63, size = 145, normalized size = 0.72 \[ \frac {\tan (c+d x) \left (\cos (c+d x) \sqrt {1-\sec (c+d x)} \left (8 A \cos ^2(c+d x)-2 A \cos (c+d x)+21 A+24 C\right )-3 (9 A+8 C) \tanh ^{-1}\left (\sqrt {1-\sec (c+d x)}\right )+24 \sqrt {2} (A+C) \tanh ^{-1}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right )\right )}{24 d \sqrt {1-\sec (c+d x)} \sqrt {a (\sec (c+d x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 2.43, size = 524, normalized size = 2.62 \[ \left [\frac {24 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right ) + {\left (A + C\right )} a\right )} \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 3 \, {\left ({\left (9 \, A + 8 \, C\right )} \cos \left (d x + c\right ) + 9 \, A + 8 \, C\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (8 \, A \cos \left (d x + c\right )^{3} - 2 \, A \cos \left (d x + c\right )^{2} + 3 \, {\left (7 \, A + 8 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{48 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}, \frac {3 \, {\left ({\left (9 \, A + 8 \, C\right )} \cos \left (d x + c\right ) + 9 \, A + 8 \, C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) + {\left (8 \, A \cos \left (d x + c\right )^{3} - 2 \, A \cos \left (d x + c\right )^{2} + 3 \, {\left (7 \, A + 8 \, C\right )} \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) - \frac {24 \, \sqrt {2} {\left ({\left (A + C\right )} a \cos \left (d x + c\right ) + {\left (A + C\right )} a\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{24 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.70, size = 844, normalized size = 4.22 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.99, size = 1056, normalized size = 5.28 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \sec \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )^{3}}{\sqrt {a \sec \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^3\,\left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________